/*
 * @Author: HeAo
 * @Date: 2021-09-26 11:23:54
 * @LastEditTime: 2021-09-26 11:47:20
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2103code\3-1-ES6\day02\10-数组API.js
 * 别乱动！
 */

// let arrObj = {
//   0: '张三',
//   1: '李四',
//   2: '王五',
//   length: 3
// }

// let obj = 'hello'

// let arr1 = Array.from(arrObj)
// console.log(arr1);


// let arr1 = new Array(3)  // [1,2,3] [empty,empty,empty]
let arr1 = Array.of(1, 2, 3, 4, 5, 6)
// console.log(arr1);

let result = arr1.findIndex((item, index) => {
  return item > 2
})
// console.log(result);

let result1 = arr1.includes(1)
// console.log(result1);

// let result2 = arr1.fill(7)
// console.log(arr1);

let keys = arr1.keys()
let values = arr1.values()
let entries = arr1.entries()

console.log(keys, values, entries);
console.log(Array.from(keys))
console.log(Array.from(values))
console.log(Array.from(entries))